<style>
    .layui-form-label.required:before { /* 这种写法也可以*/
        content: ' *';
        color: red;
    }

    .open-form .layui-input-block{
        margin-left: 145px;
    }
    .open-form .layui-form-label {
        width: 115px;
    }

    /*   添加生产计划   */
    .addProductionPlanForm-title, .examineProductionPlanForm-title {
        width: 100%;

    }

    .addProductionPlanForm-title .title, .examineProductionPlanForm-title .title {
        display: inline-block;
        margin: 20px;
        font-size: 16px;
        font-weight: bold;
        color: #333333;
        line-height: 19px;
        position: relative;
        padding: 6px 0 19px 0;
    }

    .addProductionPlanForm-title .title:after, .examineProductionPlanForm-title .title:after {
        content: '';
        display: block;
        position: absolute;
        left: 0;
        bottom: 0;
        width: calc(100% + 6px);
        height: 3px;
        background: #0A8B0A;
    }
</style>
<!-- 表单弹窗 -->
<form lay-filter="productOrderCollectionDetailForm" class="layui-form open-form">
    <div class="open-model">
        <div class="open-auto" style="padding-left: 0;">
            <div class="examineProductionPlanForm-title">
                <h3 class="title" style="margin: 0 0 20px 25px">开工单信息</h3>
            </div>
            <div class="layui-form-item layui-row">
                <div class="layui-col-md3">
                    <label class="layui-form-label required">物料编码：</label>
                    <div class="layui-input-block">
                        <input  disabled name="skuCode" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <label class="layui-form-label required">组件描述：</label>
                    <div class="layui-input-block">
                        <input  disabled name="remark" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3 required">
                    <label class="layui-form-label required">物料名称：</label>
                    <div class="layui-input-block">
                        <input  disabled name="skuName" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3 required">
                    <label class="layui-form-label required">生产线：</label>
                    <div class="layui-input-block">
                        <input  disabled name="productionLine" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-row">
                <div class="layui-col-md3 required">
                    <label class="layui-form-label required">所属客户：</label>
                    <div class="layui-input-block">
                        <input  disabled name="customerName" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <label class="layui-form-label required">采购组织：</label>
                    <div class="layui-input-block">
                        <input  disabled name="purchaseName" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <label class="layui-form-label required">单位：</label>
                    <div class="layui-input-block">
                        <input  disabled name="unitName" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <label class="layui-form-label required">提货汇总数：</label>
                    <div class="layui-input-block">
                        <input  disabled name="deliveryNums" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-row">
                <div class="layui-col-md3">
                    <label class="layui-form-label required">库存数量：</label>
                    <div class="layui-input-block">
                        <input  disabled name="kuCunNums" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <label class="layui-form-label required">下料数：</label>
                    <div class="layui-input-block">
                        <input  disabled name="alreadyNums" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <label class="layui-form-label required">已发货数：</label>
                    <div class="layui-input-block">
                        <input  disabled name="sendNums" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
                <div class="layui-col-md3">
                    <label class="layui-form-label required">欠料数：</label>
                    <div class="layui-input-block">
                        <input  disabled name="kuiQianNums" type="text" class="layui-input" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="examineProductionPlanForm-title">
                <h3 class="title" style="margin: 5px 0 5px 25px">汇总信息</h3>
            </div>
            <div style="padding-left: 25px;">
                <table class="layui-table" id="proOrderCollectDetailTableInfo" lay-filter="proOrderCollectDetailTableInfo"></table>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">关闭</button>
        </div>
    </div>
</form>

<!-- js部分 -->
<script>
    layui.use(['layer', 'form', 'table', 'laydate', 'admin', 'config'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var config = layui.config;
        var table = layui.table;
        var admin = layui.admin;
        var form = layui.form;
        var laydate = layui.laydate;

        laydate.render({
            elem: '#orderTime'
            , type: 'datetime'
        });

        let tempData = admin.getTempData("productOrderCollectDetailData");

        form.val('productOrderCollectionDetailForm',tempData)

        // 渲染表格
        table.render({
            elem: '#proOrderCollectDetailTableInfo',
            url: config.base + 'production/delivery/admin/skuOrderCollect/collectList?customerId='
                +tempData.customerId+'&productId='
                +tempData.productId+'&productionLine='
                +tempData.productionLine+'&purchaseCode='+tempData.purchaseCode,
            cellMinWidth: 100,
            cols: [[
                {type: 'numbers', title: '序号', align: 'center'}
                , {field: 'deliveryTime', title: '提货时间', align: 'center'}
                , {field: 'deliveryNums', title: '提货数量', align: 'center'}
                , {field: 'alreadyNuns', title: '已排产', align: 'center'}
                , {field: 'sendNums', title: '已发货数', align: 'center'}
                , {field: 'kuiQianNums', title: '欠料数', align: 'center'}
                , {field: 'orderNums', title: '订单数', align: 'center'}
                // , {field: 'unitName', title: '状态', align: 'center'}
            ]]
        });
    });
</script>